hysop.domain.box module

Box-shaped domains definition.

class hysop.domain.box.Box(length=None, origin=None, dim=None, lboundaries=None, rboundaries=None, **kwds)[source]

Bases: BoxView, Domain

Box-shaped domain description.

Initialize this object. If self._initialized was already set to True, raise a RuntimeError. Else, set self._initialized to True.

static __new__(cls, length=None, origin=None, dim=None, lboundaries=None, rboundaries=None, **kwds)[source]

Create or get an existing Box from a dimension, length and origin with specified left and right boundary conditions.

Parameters:
  • length (array like of float, optional) – Box sides lengthes. Default = [1.0, …]

  • origin (array like of float, optional) – Position of the lowest point of the box. Default [0.0, …]

  • dim (int, optional) – Dimension of the box.

  • lboundaries (array_like of BoxBoundaryCondition) – Left boundary conditions.

  • rboundaries (array_like of BoxBoundaryCondition) – Right boundary conditions.

dim

Dimension of the box.

Type:

int

length

Box sides lengthes.

Type:

np.ndarray of HYSOP_REAL

origin

Position of the lowest point of the box.

Type:

np.ndarray of HYSOP_REAL

end

Position of the greatest point of the box.

Type:

np.ndarray of HYSOP_REAL

lboundaries

Left boundary conditions.

Type:

np.ndarray of BoxBoundaryCondition

rboundaries

Right boundary conditions.

Type:

np.ndarray of BoxBoundaryCondition

boundaries

Left and right boundary conditions as a tuple.

Type:

tuple of np.ndarray of BoxBoundaryCondition

periodicity

Numpy array mask, True is axis is periodic, else False.

Type:

np.ndarray of bool

view(topology_state)[source]

Return a view of this domain altered by some topology_state.

class hysop.domain.box.BoxView(topology_state, domain=None, **kwds)[source]

Bases: DomainView

Create and initialize a BoxView.

static __new__(cls, topology_state, domain=None, **kwds)[source]

Create and initialize a BoxView.

property boundaries

Left and right boundary conditions as a tuple.

property end

Position of the greatest point of the box.

format_boundaries()[source]
property lboundaries

Left boundary conditions.

property length

Box sides lengthes.

long_description()[source]

Return a long description of this Box as a string.

property origin

Position of the lowest point of the box.

property periodicity

Numpy array mask, True is axis is periodic, else False.

property rboundaries

Right boundary conditions.

short_description()[source]

Return a short description of this Box as a string.